INCLUDE = -I./include
SRCFOLDER = ./src/
SERIALPARAMS = -O2
PARALLELPARAMS = -openmp -O2
CC = g++-4.2
MPICXX = mpic++

SERIALCPP = \
	src/SeqMain.cpp src/SeqJacobi.cpp

MPICPP = \
	src/ParallelJacobi.cpp src/ParallelMain.cpp

all: sequential parallel

sequential: $(SERIALCPP)
	$(CC) $(INCLUDE) $(SERIALCPP) $(SERIALPARAMS) -o projeto-03-sequencial

parallel: $(MPICPP)
	g++-4.2 -I/services/openmpi//include/openmpi \
	$(INCLUDE) \
	-I/services/openmpi//include -pthread -pthread \
	-L/services/openmpi//lib -lmpi_cxx -lmpi -lopen-rte \
	-lopen-pal -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl -fopenmp \
	$(MPICPP) -o projeto-03-paralelo -O2
